package com.tianxiabuyi.weixin.qy.message.json;


import com.tianxiabuyi.weixin.common.message.MsgType;
import com.tianxiabuyi.weixin.common.message.Text;


/**
 * 文本消息
 */
public class TextMessage extends JsonMessage {

    private Text text;

    private int safe = 0;

    public TextMessage() {
        this.msgType = MsgType.text;
    }

    public Text getText() {
        return text;
    }

    public void setText(Text text) {
        this.text = text;
    }

    public int isSafe() {
        return safe;
    }

    public void setSafe(int safe) {
        this.safe = safe;
    }

    public TextMessage text(String content) {
        this.text = new Text(content);
        return this;
    }

    public TextMessage safe() {
        this.safe = 1;
        return this;
    }
}
